package com.example.myapplication.api;

import com.example.myapplication.model.CreatePasswordRequest;
import com.example.myapplication.model.GeneratePasswordRequest;
import com.example.myapplication.model.Password;
import com.example.myapplication.model.PasswordStrength;

import java.util.List;

import retrofit2.Call;
import retrofit2.http.Body;
import retrofit2.http.DELETE;
import retrofit2.http.GET;
import retrofit2.http.POST;
import retrofit2.http.PUT;
import retrofit2.http.Path;
import retrofit2.http.Query;

public interface PasswordApi {
    @GET("/api/passwords")
    Call<List<Password>> getPasswords();

    @POST("/api/passwords/generate")
    Call<String> generatePassword(@Body GeneratePasswordRequest request);

    @POST("/api/passwords")
    Call<Password> createPassword(@Body CreatePasswordRequest request);
    
    @POST("/api/passwords/check-strength")
    Call<PasswordStrength> checkPasswordStrength(@Query("password") String password);

    @PUT("/api/passwords/{id}")
    Call<Password> updatePassword(@Path("id") Long id, @Body CreatePasswordRequest request);

    @DELETE("/api/passwords/{id}")
    Call<Void> deletePassword(@Path("id") Long id);
} 